home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / text / faqs / linux.howto.ethernet.part1 < prev    next >
Encoding:
Internet Message Format  |  1994-04-26  |  60.3 KB

  1. Subject: Linux Ethernet HOWTO (part 1/2)
  2. Newsgroups: comp.os.linux.announce,comp.os.linux.admin,comp.answers,news.answers
  3. From: Paul Gortmaker <gpg109@rsphysse.anu.edu.au>
  4. Date: Mon, 25 Apr 1994 19:39:04 GMT
  5.  
  6. Archive-Name: linux/howto/ethernet/part1
  7. Last-modified: 15 Apr 94
  8.  
  9. Linux Ethernet HOWTO v1.0 -- Last updated Mar 16, 1994
  10. =================================================================
  11.  
  12. -- covers changes up to and including Linux kernel v1.0
  13.  
  14. INDEX:
  15.  
  16. 0    Introduction.
  17. 0.01        How do I use this Guide?
  18. 0.01        Disclaimer and Copyright
  19. 0.02        Questions already?
  20. 0.03        Related Documentation
  21. 0.04        New Versions of this Document
  22. 0.05        Feedback
  23.  
  24. 1    What card should I buy for Linux?
  25. 1.01        Eight bit vs 16 bit
  26. 1.02        Low price Ethernet cards
  27. 1.03        Vendors and brands to avoid.
  28. 1.04        Type of cable that your card should support
  29.  
  30. 2    Status of various Ethernet cards under Linux.
  31. 2.01        3Com
  32. 2.02        Western Digital / SMC
  33. 2.03        NExxxx
  34. 2.04        Hewlett Packard Cards
  35. 2.05        D-Link
  36. 2.06        Cabletron
  37. 2.07        Allied Telesis
  38. 2.08        Arcnet
  39. 2.09        Digital / DEC
  40. 2.10        Intel
  41. 2.11        PureData
  42. 2.12        Xircom
  43. 2.13        Zenith
  44. 2.14        Racal-Interlan
  45. 2.15        AMD LANCE (79C960)
  46. 2.16        AT-Lan-Tec / RealTek Pocket adaptor
  47. 2.17        Ansel
  48. 2.18        DFI
  49.  
  50. 3    Clones of popular Ethernet cards.
  51. 3.01        WD80x3 Clones
  52. 3.02        NE2000 Clones
  53.  
  54. 4    Cables, coax, twisted pairs etc.
  55. 4.01        Thin Ethernet (thinnet)
  56. 4.02        Twisted Pair
  57. 4.03        Thick Ethernet
  58.  
  59. 5    Technical information.
  60. 5.01        Probed addresses
  61. 5.02        Skeleton / prototype driver
  62. 5.03        Driver interface to the kernel
  63. 5.04        Interrupts and linux
  64. 5.05        Programmed I/O vs. shared mem. vs slave/master DMA
  65. 5.06        Programming the Intel chips (i82586 and i82593)
  66. 5.07        Programming information from 3Com
  67. 5.08        Notes on AMD PCnet-ISA / LANCE Based cards (79C960)
  68. 5.09        Multicast and Promiscuous mode
  69. 5.10        The Berkeley Packet Filter (BPF)
  70. 5.11        Unresolved questions / concerns
  71.  
  72. 6    Possible problems, questions and troubleshooting.
  73. 6.01        Problems with NE2000 (and clones)
  74. 6.02        Problems with WD80*3 cards
  75. 6.03        Problems with 3Com cards
  76.  
  77. 7    Networking with a laptop computer.
  78. 7.01        Option 1 -- using SLIP
  79. 7.02        Option 2 -- Built in NE2000 compatible or PCMCIA Ethercard.
  80. 7.03        Option 3 -- ISA Ethercard in the docking station.
  81. 7.04        Option 4 -- Pocket / parallel port adaptors.
  82.  
  83. 8    Frequently asked questions.
  84. 8.01        Just the FAQ's ma'am -- just the FAQ's.
  85.  
  86. 9    Miscellaneous.
  87. 9.01        Bad Vendors
  88. 9.02        Closing
  89.  
  90. ======================================================================
  91.  
  92. 0. Introduction.
  93.  
  94.     This is the Ethernet-HOWTO, which is a compilation of information
  95.     about which ethernet devices can be used for Linux, and how to
  96.     set them up.
  97.  
  98.     This Ethernet-HOWTO is by:
  99.         Donald J. Becker    <becker@super.org>
  100.         Paul Gortmaker        <gpg109@rsphy1.anu.edu.au>
  101.  
  102.     It covers what cards you should and shouldn't buy; how to set
  103.     them up, how to run more than one, and other common problems and
  104.     questions. It does *not* cover the software end of things, as that
  105.     is covered in the NET-2 HOWTO.
  106.  
  107.     Other people who have contributed (directly or indirectly) are,
  108.     in alphabetical order:
  109.  
  110.     Peter Bauer        <pbauer@rnivh.rni.sub.org>
  111.     Ross Biro        <bir7@leland.Stanford.EDU>
  112.     Alan Cox        <iiitac@pyr.swan.ac.uk>
  113.     David C. Davies        <davies@wanton.enet.dec.com>
  114.     Bjorn Ekwall        <bj0rn@blox.se>
  115.     Charles Hedrick        <hedrick@geneva.rutgers.edu>
  116.     Mike Jagdis        <jaggy@purplet.demon.co.uk>
  117.     Duke Kamstra        <kamstra@ccmail.west.smc.com>
  118.     Russell Nelson        <nelson@crynwr.com>
  119.     Cameron Spitzer        <camerons@NAD.3Com.com>
  120.     Dave Roberts        <david.roberts@amd.com>
  121.     Glenn Talbott        <gt@hprnd.rose.hp.com>
  122.     Miquel van Smoorenburg    <miquels@cistron.nl.mugnet.org>
  123.  
  124.     Many thanks to the above people, and all the other unmentioned
  125.     testers out there.
  126.  
  127. 0.01 How Do I Use This Guide?
  128.  
  129.     As this guide is getting bigger and bigger, you probably don't want
  130.     to spend the rest of your afternoon reading the whole thing. And you
  131.     don't *have* to read it all. If you haven't got an ethernet card, then
  132.     you will want to start with section one to see what you should buy,
  133.     and what you should avoid. If you have already got an ethernet card,
  134.     but are not sure if you can use it with Linux, then you will want to
  135.     read section two, which contains specific information on each
  136.     manufacturer, and their cards. If you are having trouble with your
  137.     card, then you will want to read the specific information about
  138.     your card in section two and the troubleshooting information in
  139.     section six. If you are interested in some of the technical aspects
  140.     of the device drivers, then you can find that information in
  141.     section 5.
  142.  
  143. 0.01 Disclaimer and Copyright
  144.  
  145.     This document is *not* gospel. However, it is probably the most
  146.     up to date info that you will be able to find. Nobody is responsible
  147.     for what happens to your hardware but yourself. If your ethercard
  148.     or any other hardware goes up in smoke (...nearly impossible!)
  149.     we take no responsibility. ie. THE AUTHORS ARE NOT RESPONSIBLE
  150.     FOR ANY DAMAGES INCURRED DUE TO ACTIONS TAKEN BASED ON THE
  151.     INFORMATION INCLUDED IN THIS DOCUMENT.
  152.  
  153.     This document is Copyright (c) 1994 by Donald Becker and
  154.     Paul Gortmaker. Permission is granted to make and distribute
  155.     verbatim copies of this manual provided the copyright notice
  156.     and this permission notice are preserved on all copies.
  157.  
  158.     Permission is granted to copy and distribute modified versions
  159.     of this document under the conditions for verbatim copying,
  160.     provided that this copyright notice is included exactly as in
  161.     the original, and that the entire resulting derived work is
  162.     distributed under the terms of a permission notice identical
  163.     to this one.
  164.  
  165.     Permission is granted to copy and distribute translations
  166.     of this document into another language, under the above
  167.     conditions for modified versions.
  168.  
  169. 0.02 Questions already?
  170.  
  171.     If you have questions about your ethernet card, please READ this
  172.     document first. You may also want to join the NET channel of the
  173.     Linux-activists mailing list by sending mail to
  174.         linux-activists-request@niksula.hut.fi
  175.     with the line
  176.         X-Mn-Admin: join NET
  177.     at the top of the message body (not the subject). If you want to
  178.     learn how to use the mailing channels, then send an empty message
  179.     to the above address, and you will get an instruction manual sent
  180.     back to you in a few hours. However, it is worth noting that the NET
  181.     channel is primarily used for discussion of the networking code, and
  182.     you may not see much discussion about a particular driver.
  183.     Furthermore keep in mind that the NET channel is for development
  184.     discussions only. General questions on how to configure your system
  185.     should be directed to comp.os.linux.help unless you are actively
  186.     involved in the development of part of the networking for Linux.
  187.     We ask that you *please* respect this general guideline for content.
  188.     You can safely bet that neither of the authors will respond to
  189.     any plea for help that *should* be posted to c.o.l.help, but is
  190.     inappropriately placed elsewhere.
  191.  
  192. 0.03 Related Documentation
  193.  
  194.     Much of this info came from saved postings from the comp.os.linux
  195.     groups, which shows that it is a valuable resource of information.
  196.     Other useful information came from a bunch of small files by Donald
  197.     himself. Some of these are found at /pub/linux/info on ftp.super.org
  198.     [192.31.192.1] Of course, if you are setting up an Ethernet card,
  199.     then you will want to read the NET-2 HOWTO so that you can actually
  200.     do something with it. ftp.super.org is the home of most alpha drivers
  201.     that are not presently in the kernel. And last but not least, the
  202.     contributions from the individuals and companies listed above are
  203.     greatly appreciated as well. Oh yeah, if you fancy yourself as
  204.     a bit of a hacker, you can always scrounge some additional info
  205.     from the driver source files as well. There is usually a paragraph
  206.     in there describing any important points.
  207.  
  208. 0.04 New versions of this document
  209.  
  210.     New versions of this document can be retrieved via anonymous
  211.     FTP from sunsite.unc.edu:/pub/Linux/docs/HOWTO/* and various
  212.     Linux ftp mirror sites. It will also be posted to the newsgroup
  213.     comp.os.linux.announce at a regular interval. Updates will be made
  214.     as new information / drivers becomes available. If this copy
  215.     that you are reading is more than 2 months old, it is either out of
  216.     date, or it means that I have been lazy and haven't updated it.
  217.  
  218. 0.05 Feedback
  219.  
  220.     Any corrections can be sent to one of us (gpg109@rsphysse.anu.edu.au
  221.     or becker@super.org) We will *attempt* to keep this up to date as
  222.     more drivers become available, and as the networking code matures.
  223.  
  224. 1 What card should I buy for Linux?
  225.  
  226.     For impatient users that just want a quick, cheap answer the
  227.     summary is: get 16 bit thinnet 8013 cards. For more detail as
  228.     to the who what where and why, read on.
  229.  
  230. 1.01 Eight bit vs 16 bit
  231.  
  232.     Unless you are a light user, or are confined to using the smaller
  233.     ISA slot, the use of the 8 bit cards like the wd8003 and the 3c503
  234.     is really not worth the cost savings. Get the 8013 or the 3c503/16
  235.     instead.
  236.  
  237. 1.02 Low price Ethernet cards
  238.  
  239.     I keep track of the current low-price vendors, just because it's
  240.     asked so often. Call AT-LAN-TEC at 301-948-7070. Ask for their
  241.     technical support person, "Vincent Bono". As with all purchases,
  242.     you should indicate you are buying this for a Linux system.
  243.     The last I checked the price for 10 NE2000s was $480, or $48 ea.!
  244.     NB: Their current NE2000 clone is a model that "traps" other
  245.     drivers that probe into their address space. AT-LAN-TEC also carries
  246.     a clone, non-EEPROM 8013 board for somewhat more, and a NE2100 clone.
  247.     Either is a better choice if the very lowest price isn't essential.
  248.     Also, SMC is offering an evaluation deal on their new Ultra cards,
  249.     and the word is that you can get one for $50. You can ask them
  250.     yourself by calling 1-800-SMC-4YOU in Canada and the USA.
  251.  
  252.     The Allied Telesis AT1500 is offered at a good price by many vendors.
  253.     Even Inmac, known for their premium markup, has this card for under
  254.     $100.
  255.  
  256. 1.03 Vendors and Brands to Avoid
  257.  
  258.     These vendors have decided *not* to release programming information
  259.     about their products, without signing a non-disclosure agreement.
  260.     More information can be found in section two and 9.01. Hence it is
  261.     strongly advised that you avoid buying products offered from
  262.     these companies.
  263.  
  264.         (1) Cabletron
  265.         (2) Xircom
  266.  
  267.     These particular cards should be avoided, as they are obsolete.
  268.     The reasons as to why they have been classified as such can be
  269.     found in section 2 of this document.
  270.  
  271.         (1) 3c501
  272.         (2) Arcnet
  273.  
  274. 1.04 Type of cable that your card should support
  275.  
  276.     Unless you have to conform to an existing network, you will want
  277.     to use thinnet or thin ethernet cable. This is the style with the
  278.     standard BNC connectors. See section 4 for other concerns with
  279.     different types of ethernet cable.
  280.  
  281.     Most ethercards also come in a "Combo" version for only $10-$20 more.
  282.     These have both twisted pair and thinnet transceiver built-in,
  283.     allowing you to change your mind later.
  284.  
  285. 2 Status of Various Ethernet Cards under Linux
  286.  
  287.     The only thing that one needs to use an ethernet card with Linux
  288.     is the appropriate driver. For this, it is essential that the
  289.     manufacturer will release the technical programming information to
  290.     the general public without you (or anyone) having to sign your life
  291.     away. A good guide for the likelihood of getting documentation
  292.     (or, if you aren't writing code, the likelihood that someone
  293.     else will write that driver you really, really need) is the
  294.     availability of the Crynwr (nee Clarkson) packet driver. Russ
  295.     Nelson (see the acknowledgements in the intro.) runs this
  296.     operation, and has been very helpful in supporting the development
  297.     of drivers for Linux.
  298.  
  299.     Given the documentation, you can write a driver for
  300.     your card and use it for Linux, at least in theory. Keep in
  301.     mind that some old hardware that was designed for XT type
  302.     machines will not function very well in a multitasking
  303.     environment such as Linux. Use of these will lead to major
  304.     problems if your network sees a reasonable amount of traffic.
  305.  
  306.     Most cards come with drivers for MS-DOS interfaces such as
  307.     NDIS and ODI, but these are useless for Linux. Many people
  308.     have suggested directly linking them in or automatic
  309.     translation, but this is nearly impossible. The MS-DOS
  310.     drivers expect to be in 16 bit mode and hook into "software
  311.     interrupts", both incompatible with the Linux kernel. This
  312.     incompatibility is actually a feature, as some Linux drivers
  313.     are considerably better than their MS-DOS counterparts. The
  314.     "8390" series drivers, for instance, use ping-pong transmit
  315.     buffers, which are only now being introduced in the MS-DOS world.
  316.  
  317.     Keep in mind that PC ethercards have the widest variety of
  318.     interfaces (shared memory, programmed I/O, bus-master, or slave
  319.     DMA) of any computer hardware for anything, and supporting a
  320.     new ethercard sometimes requires re-thinking most of the lower-level
  321.     networking code. (If you are interested in learning more about
  322.     these different forms of interfaces, see section 5)
  323.  
  324.     Also, similar product numbers don't always indicate similar products.
  325.     For instance, the 3c50* product line from 3Com varies wildly
  326.     between different members.
  327.  
  328.     Enough talk. Let's get down to the information you want.
  329.  
  330. 2.01 3Com
  331.  
  332.     Supported:
  333.  
  334.         3c503, 3c503/16
  335.             3Com shared-memory ethercards. They also have a
  336.             programmed I/O mode that doesn't use the 8390
  337.             facilities (their engineers found too many bugs!)
  338.             It should be about the same speed as the same bus
  339.             width WD80x3, but I don't have a 16 bit version
  340.             to benchmark. Unless you are a light user, spend
  341.             the extra money and get the 16 bit model, as the
  342.             price difference isn't significant. The 3c503 does not
  343.             have "EEPROM setup", so the diagnostic/setup program
  344.             isn't needed before running the card with Linux. The
  345.             shared memory address of the 3c503 is set using jumpers
  346.             that are shared with the boot PROM address. This is
  347.             confusing to people familiar with other ISA cards,
  348.             where you always leave the jumper set to "disable"
  349.             unless you have a boot PROM.
  350.  
  351.             The Linux 3c503 driver can also work with the 3c503
  352.             programmed-I/O mode, but this is slower and less
  353.             reliable than shared memory mode. Also, programmed-I/O
  354.             mode is not tested when updating the drivers, the
  355.             deadman (deadcard?) check code may falsely timeout on
  356.             some machines, and the probe for a 3c503 in
  357.             programmed-I/O mode is turned off by default in some
  358.             versions of the kernel. This was a panic reaction to
  359.             the general device driver probe explosion; the 3c503
  360.             shared memory probe is a safe read from memory, rather
  361.             than an extensive scan through I/O space. As of pl13,
  362.             the kernel has an I/O port registrar that makes I/O
  363.             space probes safer, (see section 5.1 for more info.)
  364.             and the programmed-I/O 3c503 probe has been re-enabled.
  365.             You still shouldn't use the programmed-I/O mode though,
  366.             unless you need it for MS-DOS compatibility.
  367.  
  368.             The 3c503's IRQ line is set in software, with no hints
  369.             from an EEPROM. Unlike the MS-DOS drivers, the
  370.             Linux driver has capability to autoIRQ: it uses the
  371.             first available IRQ line in {5,2/9,3,4}, selected each
  372.             time the card is 'ifconfig'ed. (Older driver versions
  373.             selected the IRQ at boot time.) The ioctl() call
  374.             in 'ifconfig' will return EAGAIN if no IRQ line is
  375.             available at that time.
  376.  
  377.         3c509
  378.             A fairly new card from 3Com. It's inexpensive and has
  379.             excellent performance for a non-bus-master design. The
  380.             drawbacks are that it _requires_ very low interrupt
  381.             latency, and it isn't rated for bus speeds greater than
  382.             8Mhz.
  383.  
  384.             A working 3c509 driver was first included as an
  385.             alpha-test version in the 0.99pl13 kernel sources.
  386.             It is now in the standard kernel.
  387.  
  388.             The 3c509 has a tiny Rx buffer, causing the driver to
  389.             occasionally drop a packet if interrupts are masked for
  390.             too long. To minimize this problem, the driver should
  391.             be completely rewritten to use predictive interrupts.
  392.             (Note: performance re-writes of working drivers are low
  393.             priority unless there is some particular incentive or
  394.             need.)
  395.  
  396.             There is also an alpha version of a Linux 3c509
  397.             diagnostic and EEPROM setup program, but for now
  398.             users that don't like the defaults should use the
  399.             MS-DOS EEPROM setup program.
  400.  
  401.         3c579
  402.             The EISA version of the 509. The current EISA version
  403.             uses the same 16 bit wide chip rather than a 32 bit
  404.             interface, so the performance increase isn't stunning.
  405.             The EISA probe code was added to 3c509.c for pl14.
  406.             We would be interested in hearing progress reports
  407.             from any 3c579 users. (Read the above 3c509
  408.             section for info on the driver.)
  409.  
  410.             Cameron Spitzer writes:
  411.             "The 3C579 (Etherlink III EISA) should be configured
  412.             as an EISA card. The IO Base Address (window 0
  413.             register 6 bits 4:0) should be 1f, which selects EISA
  414.             addressing mode. Logic outside the ASIC decodes the
  415.             IO address s000, where s is the slot number. I don't
  416.             think it was documented real well. Except for its IO
  417.             Base Address, the '579 should behave EXACTLY like the
  418.             '509 (EL3 ISA), and if it doesn't, I want to hear
  419.             about it (at my work address).
  420.  
  421.             I will leave it to the Real Programmers to suggest
  422.             the right hack to /usr/src/linux/net/inet/3c509.c to
  423.             take care of the EISA case.
  424.  
  425.             (Note that the drivers now reside in ./drivers/net/
  426.              and *not* ./inet/net/ --- pg.)
  427.  
  428.             Beware that if you put a '509 in EISA addressing mode
  429.             by mistake and save that in the EEPROM, you'll have
  430.             to use an EISA machine or the infamous Test Via to
  431.             get it back to normal, and it will conflict at IO
  432.             location 0 which may hang your ISA machine. It's not
  433.             my job to say whether this is a bug or feature, but I
  434.             have heard loud and clear that customers don't like
  435.             it and I don't think we'll do it that way again."
  436.  
  437.     Unsupported:
  438.  
  439.         3c501
  440.             Too brain-damaged to use. Available surplus from many
  441.             places. Avoid it like the plague. Again, do not
  442.             purchase this card, even as a joke. It's performance
  443.             is horrible, and it breaks in many ways.
  444.  
  445.             (I have a standing offer: I'll pay $2 for each 3c501
  446.             shipped to me postpaid, but only if you include the
  447.             BNC 'T' connector and the jumpers. $2.50 if you just
  448.             send the 'T', jumpers, and address PROM and promise to
  449.             destroy the board. -djb)
  450.  
  451.             Cameron L. Spitzer of 3Com said:
  452.             "I'm speaking only for myself here, of course, but I
  453.             believe 3Com advises against installing a 3C501 in a
  454.             new system, mostly for the same reasons Donald has
  455.             discussed. You probably won't be happy with the
  456.             3C501 in your Linux box. The data sheet is marked
  457.             "(obsolete)" on 3Com's Developers' Order Form, and
  458.             the board is not part of 3Com's program for sending
  459.             free Technical Reference Manuals to people who need
  460.             them. The decade-old things are nearly
  461.             indestructible, but that's about all they've got
  462.             going for them any more."
  463.  
  464.             For those not yet convinced, the 3c501 can only do one
  465.             thing at a time -- while you are removing one packet
  466.             from the single-packet buffer it cannot receive
  467.             another packet, nor can it receive a packet while are
  468.             loading a transmit packet. This was fine for a
  469.             network between two 8088-based computers where
  470.             processing each packet and replying took 10's of
  471.             msecs, but modern networks send back-to-back
  472.             packets for almost every transaction.
  473.  
  474.             Having read this far, you must be persistent, so you
  475.             get let in on a secret. As of pl13, some more of
  476.             the hardware problems were "compensated for".
  477.  
  478.             Ie. in a fit of madness I wasted a whole day updating
  479.             my 3c501 driver and then trying to track down a few
  480.             more of the 3c501 glitches. It now works well enough
  481.             to NFS mount filesystems, but the receiver still
  482.             occasionally hangs. I'm mostly certain that this is
  483.             a hardware bug. When it hangs, the next set of
  484.             outgoing packets will reset the board, but that's
  485.             only useful if you have something occasionally
  486.             generating outgoing packets.
  487.  
  488.             The driver is now in the std. kernel, but under the
  489.             following conditions: This is unsupported code. I
  490.             know my usual copyright says all the code is
  491.             unsupported, but this is _really_ unsupported. I
  492.             DON'T want to see bug reports, and I'll accept bug
  493.             fixes only if I'm in a good mood that day.
  494.  
  495.             I don't want to see a fest of "Linux ethercards for
  496.             sale" postings. A bunch of people have bought dozens
  497.             of "dumpster special" 3c501s, and they hope to sell
  498.             them at rip-off prices. A 3c501 is barely worth the
  499.             shipping cost, and if I see people trying to sell
  500.             them here by claiming "supported by Linux" I _will_
  501.             flame them. They are _not_ supported by Linux.
  502.  
  503.             I don't want to be flamed later for putting out bad
  504.             software. I don't know all all of the 3c501 bugs,
  505.             and I know this driver only handles a few that I've
  506.             been able to figure out. It has taken a long
  507.             intense effort just to get the driver working this
  508.             well.
  509.  
  510.             That said, you will find it included in "config.in"
  511.             No special mods are needed to use it with pl15
  512.             or greater kernels. Jumper your card to 0x280.
  513.  
  514.             AutoIRQ works, DMA isn't used, the autoprobe only
  515.             looks at 0x280, the debug level is set with the third
  516.             boot-time argument. You'll probably want to change
  517.             the default EL_DEBUG to '2'.
  518.  
  519.             Once again, THE USE OF A 3c501 IS STRONGLY DISCOURAGED
  520.             and it is NOT SUPPORTED BY LINUX.
  521.  
  522.  
  523.         3c505
  524.             An Intel-based ethercard with no driver available
  525.             at present. (Not a very common card.)
  526.  
  527.         3c507
  528.             This card uses one of the Intel chips, and the
  529.             development of the driver is closely related to
  530.             the development of the Intel Ether Express driver.
  531.             The driver has been included in the standard
  532.             release of pl15. You will have to un-comment
  533.             the 3c507 line in "config.in" -- in case you
  534.             didn't figure it out already, it is commented
  535.             out because it is still being tested.
  536.  
  537.             Technical information is available in section 5.06,
  538.             and if you have experience in writing drivers, see
  539.             section 5.07 as well.
  540.  
  541. 2.02 Western Digital / SMC
  542.  
  543.     The ethernet part of Western Digital has been bought by SMC. The
  544.     SMC Elite and SMC Elite Plus are the same as late-model WD8003
  545.     and WD8013 cards. Note that the SMC Elite Ultra is *not* the
  546.     same as the plain SMC Elite / WD8013 card. (see below)
  547.  
  548.     Supported:
  549.  
  550.         WD8003, WD8013, SMC Elite, SMC Elite Plus
  551.             A shared memory design by Western Digital. The
  552.             8 bit 8003 is slightly less expensive, but only
  553.             worth the savings for light use. Over the
  554.             years the design has added more registers and an
  555.             EEPROM. Clones usually go by the '8013' name, and
  556.             usually use a non-EEPROM (jumpered) design. This part
  557.             of WD has been sold to SMC, so you'll usually see
  558.             something like SMC/WD8013 or SMC Elite Plus (WD8013).
  559.             The shared memory makes the cards 10-20% faster,
  560.             especially with larger packets. More importantly
  561.             (to me at least) it avoids a few bugs in the
  562.             programmed-I/O mode of the 8390, allows safe
  563.             multi-threaded access to the packet buffer, and
  564.             doesn't have a programmed-I/O data register that
  565.             hangs your machine during warm-boot probes.
  566.  
  567.         SMC Elite 16 ULTRA
  568.             This ethercard is based on a new chip from SMC, with
  569.             a few new features. While it has a mode that is
  570.             similar to the older SMC ethercards, it's not
  571.             compatible with the old WD80*3 drivers. However, in
  572.             this mode it shares most of its code with the other
  573.             8390 drivers, while operating somewhat faster than a
  574.             WD8013 clone.
  575.  
  576.             Some of the device probe checks in pl14 were too
  577.             too strict, causing some cards to not be detected
  578.             every time. This was fixed for pl14a, and hence is
  579.             fine for pl15. Since part of the Ultra "looks" like
  580.             an 8013, the Ultra probe is supposed to find an
  581.             Ultra before the wd8013 probe has a chance to
  582.             mistakenly identify it.
  583.  
  584.             Std. as of pl14, and made possible by documentation
  585.             and ethercard loan from kamstra@ccmail.west.smc.com,
  586.             Duke Kamstra. If you plan on using an Ultra with Linux
  587.             send him a note of thanks to let him know that there
  588.             are Linux users out there!
  589.  
  590.             I'm considering writing a separate driver for the
  591.             Ultra's "Altego" mode which allows chaining transmits
  592.             at the cost of inefficient use of receive buffers,
  593.             but that will probably not happen right away.
  594.             Performance re-writes of working drivers are low
  595.             priority unless there is some particular incentive
  596.             or need.
  597.  
  598. 2.03 NExxxx
  599.  
  600.     The prefix "NE" came from Novell Ethernet. Novell followed the
  601.     cheapest NatSemi databook design and sold the manufacturing rights
  602.     (spun off?) Eagle, just to get reasonably-priced ethercards into
  603.     the market.
  604.  
  605.     Supported:
  606.  
  607.         NE1000, NE2000
  608.             The now-generic name for a bare-bones design around
  609.             the NatSemi 8390. They use programmed I/O rather than
  610.             shared memory, leading to easier installation but
  611.             slightly lower performance and a few problems. Again,
  612.             the savings of using an 8 bit NE1000 over the NE2000
  613.             are only warranted if you expect light use. Some
  614.             recently introduced NE2000 clones use the National
  615.             Semiconductor "AT/LANTic" 83905 chip, which offers
  616.             a shared memory mode similar to the 8013 and EEPROM
  617.             or software configuration. Some problems can arise
  618.             with poor clones. See the question and answer section
  619.             later in this document, and the section on clones.
  620.             I have written a NE2000 diagnostic program, but it
  621.             is still presently in alpha test. (ne2k)
  622.  
  623.         NE1500, NE2100
  624.             The AT1500 driver, recently added to the list of
  625.             supported cards, also supports the NE1500, NE2100 and
  626.             clones. The driver shipped with pl12 kernel doesn't
  627.             detect non-AT1500 cards with autoprobe, but will work
  628.             fine if you specify the base address explicitly and
  629.             jumper for DMA channel 5. Read the Allied Telesis
  630.             section for more information on LANCE based cards.
  631.  
  632. 2.04 Hewlett Packard
  633.  
  634.     The 272** cards use programmed I/O, similar to the NE*000 boards,
  635.     but the data transfer port can be "turned off" when you aren't
  636.     accessing it, avoiding problems with autoprobing drivers.
  637.  
  638.     Thanks to Glenn Talbott for cleaning up the confusion in this
  639.     section regarding the version numbers of the HP hardware, and
  640.     adding lots of new info.
  641.  
  642.     Supported:
  643.  
  644.         27245A
  645.             8 Bit 8390 based 10BaseT, not recommended for all the
  646.             8 bit reasons. It was re-designed a couple years
  647.             ago to be highly integrated which caused some
  648.             changes in initialization timing which only
  649.             affected testing programs, not LAN drivers. (The
  650.             new card is not 'ready' as soon after switching
  651.             into and out of loopback mode.)
  652.  
  653.         27247B, 27252A
  654.             The 47B is a 16 Bit 8390 based 10BaseT w/AUI, and
  655.             the 52A is a 16 Bit 8390 based ThinLAN w/AUI.
  656.             These cards are high performers (3c509 speed) without
  657.             the interrupt latency problems (32K onboard RAM for TX
  658.             or RX packet buffering). They both offer LAN
  659.             connector autosense, data I/O in I/O space (simpler) or
  660.             memory mapped (faster), and soft configuration. 27247B
  661.             was rated Best for ISA Servers by PC Mag this year.
  662.  
  663.         27247A
  664.             This is the older model that existed before the "B".
  665.             Two versions 27247-60001 or 27247-60002 have part
  666.             numbers marked on the card. Functionally the same to
  667.             the LAN driver, except bits in ROM to identify
  668.             boards differ. -60002 has a jumper to allow
  669.             operation in non-standard ISA busses (chipsets
  670.             that expect IOCHRDY early.)
  671.  
  672.         HP J2405A
  673.             These are lower priced, and slightly faster than the
  674.             27247B/27252A, but are missing some features, such
  675.             as AUI, ThinLAN connectivity, and boot PROM socket.
  676.             This is a fairly generic LANCE design, but a minor
  677.             design decision makes it incompatible with a generic
  678.             "NE2100" driver. Special support for it (including
  679.             reading the DMA channel from the board) is in pl14
  680.             and up, thanks to information provided by HP's Glenn
  681.             Talbott, gt@hprnd.rose.hp.com. Note that the pre pl14
  682.             driver should not be used with this card.
  683.  
  684.             More information on LANCE based cards can be found in
  685.             section 5.08.
  686.  
  687. 2.05 D-Link
  688.  
  689.     Supported:
  690.  
  691.         DE-600
  692.             Laptop users and other folk who might want a quick
  693.             way to put their computer onto the ethernet may want
  694.             to use this. The driver was included with the default
  695.             kernel source tree as of pl12 and possibly earlier.
  696.             Bjorn Ekwall <bj0rn@blox.se> wrote the original.
  697.             Expect about 80kb/s transfer speed from this via the
  698.             parallel port. You should read the README.DLINK
  699.             file in the kernel source tree. The latest release
  700.             of this driver is v0.32, and it is included in the
  701.             standard kernel of pl15
  702.  
  703.         DE-650
  704.             Some people have been using this PCMCIA card for
  705.             some time now with their notebooks. Note however,
  706.             that using a PCMCIA card with Linux is not trivial.
  707.             See the section on networking with a notebook for
  708.             more information on PCMCIA cards. This driver is
  709.             *not* part of the standard kernel.
  710.  
  711.         DE-100, DE-200, DE-220-T
  712.             The manual says that it is 100% compatible with the
  713.             NE2000. This is not true. You should call them and
  714.             tell them you are using their card with Linux, and they
  715.             should correct their documentation. Some pre-0.99pl12
  716.             driver versions may have trouble recognizing the DE2**
  717.             series as 16 bit cards, and these cards are the most
  718.             widely reported as having the spurious transfer address
  719.             mismatch errors. Note that there are cards from
  720.             Digital (DEC) that are also named DE100 and DE200,
  721.             but the similarity stops there.
  722.  
  723.     Unsupported:
  724.  
  725.         DE-620
  726.             Same as the DE-600, only with two output formats.
  727.             (BNC and RJ-45, I would assume... ????)
  728.             Bjorn writes: "I have still no information on the
  729.             DE-620 that I can include in this release. (Maybe
  730.             someone well connected to D-Link sees this,
  731.             hint, hint, hint...)
  732.  
  733. 2.06 Cabletron
  734.  
  735.     Yes, another one of these companies that won't release its
  736.     programming information. They waited for months before actually
  737.     confirming that all their information was proprietary, deliberately
  738.     wasting my time. Avoid their cards like the plague if you can.
  739.     Also note that some people have phoned Cabletron, and have been
  740.     told things like "a dbecker@super.org is working on a driver
  741.     for linux" -- making it sound like I work for them. This is
  742.     NOT the case. Anyway, if I were working for them, or even if
  743.     I had signed a ND agreement, I wouldn't be able to tell
  744.     everyone what a sleazy design the E2100 is. (See below.)
  745.  
  746.     If you feel like asking them why they don't want to release their
  747.     info so that people can use their cards, write to support@ctron.com
  748.     Tell them that you are using Linux, and are disappointed that they
  749.     don't support open systems. (See section 9.01)
  750.  
  751.     Supported: (...well, not *really* supported)
  752.  
  753.         E10**, E10**-x, E20**, E20**-x
  754.             These are NEx000 almost-clones that are reported to
  755.             work with the standard NEx000 drivers, thanks to a
  756.             ctron-specific check during the probe. If there are
  757.             any problems, they are unlikely to be fixed, as the
  758.             programming information is unavailable.
  759.  
  760.  
  761.         E21**
  762.             Again, there is not much one can do when the
  763.             programming information is proprietary.
  764.             The E2100 is a poor design. Whenever it maps its
  765.             shared memory in during a packet transfer, it
  766.             maps it into the *whole 128K region*! That means you
  767.             *can't* safely use another interrupt-driven shared
  768.             memory device in that region, including another E2100.
  769.             It will work _most_ of the time, but every once in
  770.             a while it will bite you. (Yes, this problem can
  771.             be avoided by turning off interrupts while
  772.             transferring packets, but that will almost certainly
  773.             lose clock ticks.
  774.  
  775.             Also, don't confuse the E2100 for a NE2100 clone.
  776.             The E2100 is a shared memory NatSemi DP8390 design,
  777.             roughly similar to a brain-damaged WD8013, whereas
  778.             the NE2100 (and NE1500) use a bus-mastering AMD
  779.             LANCE design.
  780.  
  781.             There is an alpha test driver available (even though
  782.             I shouldn't have bothered) in the normal place
  783.             (see the FAQ section) -- e2100.c -- let me know if
  784.             you use it, and how it works. Don't forget to
  785.             un-comment the line in config.in.
  786.  
  787. 2.07    Allied Telesis
  788.  
  789.     Allied Telesis is the worlds largest maker of separate
  790.     transceivers thanks to their low prices, and they now have a
  791.     series of low-cost ethercards using the 79C960 version of the AMD
  792.     LANCE. These are bus-master cards, and thus probably the fastest
  793.     ISA bus ethercards available (although the 3c509 has lower latency
  794.     thanks to predictive interrupts).
  795.  
  796.     Supported:
  797.  
  798.         AT1500
  799.             The driver for the AT1500 series is new in the
  800.             0.99pl12 kernel, but it won't work "out-of-the-box"
  801.             with >16M machines. (NB This isn't a fundamental
  802.             limitation, so stop pointing and laughing at the ISA
  803.             bus. The driver just needs a hook to allocate
  804.             low-memory buffers for the bus-master DMA, and should
  805.             be just as fast on >16M systems. It can be easily
  806.             fixed by initializing the LANCE driver with the
  807.             character devices, but this fix depends on the
  808.             resolution of the networking code uncertainty.)
  809.  
  810.             For the ISA bus master mode all structures used
  811.             directly by the LANCE, the initialization block,
  812.             Rx and Tx rings, and data buffers, must be accessible
  813.             from the ISA bus, i.e. in the lower 16M of real memory.
  814.             This is a problem for current Linux kernels on >16M
  815.             machines. The network devices are initialized after
  816.             memory initialization, and the kernel doles out memory
  817.             from the top of memory downward. The current solution
  818.             is to have a special network initialization routine
  819.             that's called before memory initialization; this will
  820.             eventually be generalized for all network devices.
  821.             Low-memory "bounce-buffers" are used when needed.
  822.  
  823.             This driver should also work with NE1500 and NE2100
  824.             clones.
  825.             
  826.             Future driver versions may figure out a way to
  827.             autoDMA. Although there is no autoDMA (until I verify
  828.             that autoDMA is safe and reliable), some versions
  829.             (pl13) allow passing the DMA channel at boot-time via
  830.             LILO. (Boot-time parameters can be made permanent in
  831.             LILO v13+, read the docs.) The DMA channel otherwise
  832.             defaults to DMA5.
  833.  
  834.             In pl14, there was a buglet that would hang some
  835.             machines with AT1500 like cards. Either get pl15
  836.             or newer, or go into ./init/main.c and move the
  837.             sti(); and claibrate_delay(); (near line 366) in
  838.             *front of* the #ifdef CONFIG_INET, instead of
  839.             after it.
  840.             
  841.             Please report the exact chip used by your ethercard,
  842.             and any success or failure you have. This driver is
  843.             still young, and I've gotten few reports.
  844.  
  845.             More information on AMD LANCE based Ethernet cards
  846.             can be found in section 5.08.
  847.  
  848.         AT1700
  849.             The Allied Telesis AT1700 series ethercards are based
  850.             on the Fujitsu MB86965. This chip uses a programmed
  851.             I/O interface, and a pair of fixed-size transmit
  852.             buffers. This allows small groups of packets to sent
  853.             be sent back-to-back, with a short pause while
  854.             switching buffers.
  855.             
  856.             A unique feature is the ability to drive 150ohm STP
  857.             (Shielded Twisted Pair) cable commonly installed for
  858.             Token Ring, in addition to 10baseT 100ohm UTP
  859.             (unshielded twisted pair).
  860.             
  861.             A mis-feature to watch out for is that the current
  862.             production version silently wires to DMA channel 5,
  863.             rendering it useless. No device driver will be
  864.             written using DMA if installing a second card into
  865.             the machine breaks both, and the only way to disable
  866.             the DMA is with a knife.
  867.             
  868.             The at1700 driver is included in the standard pl15
  869.             kernel source tree.
  870.             
  871. 2.08 Arcnet
  872.  
  873.     There is no Arcnet driver for Linux. Feel free to write a driver. With
  874.     the very low cost and better performance of ethernet, I expect that
  875.     most places will be giving away their Arcnet hardware for free,
  876.     resulting in a lot of home systems with Arcnet.
  877.  
  878.     An advantage of Arcnet is that all of the cards have identical
  879.     interfaces, so once a driver is available it will work for everyone.
  880.  
  881. 2.09 Digital / DEC
  882.  
  883.     Supported: DE200, DE210, DE202, DE100, DEPCA rev E
  884.  
  885.         As of linux v1.0, there is a driver included as standard
  886.         for these cards. It was written by David C. Davies.
  887.         There is documentation included in the source file
  888.         "depca.c", which includes info on how to use more than
  889.         one of these cards in a machine.
  890.  
  891.         If you have / want to use the pl15 kernel or older,
  892.         then you will have to use Peter Bauer's driver.
  893.         It can be found as a separate patch called depca-0.8.tar.gz.
  894.         You will have to un-comment the DEPCA line in "config.in"
  895.         after installing the patch. You can find the patch on
  896.         ftp.funet.fi, /pub/OS/Linux/BETA/depca/depca-0.8.tar.gz
  897.         This version resets the card upon close so that you can
  898.         use it with broken DOS drivers after a warm boot.
  899.  
  900.  
  901.     Unsupported: Digital Etherlink III
  902.  
  903.         Peter Bauer said that "the new etherlink III seems to
  904.         be a break: No official docu from DEC as far as today,
  905.         other (incompatible??) hardware used, and (no joke) (at least
  906.         for the first delivered cards) also a sharp knife necessary
  907.         to get the card working (needs cut of some irq lines ...)
  908.         As far as I know, lots of DEC Employees use Linux (at least
  909.         for hobby purposes) and the depca-driver, because its a
  910.         de-facto standard in DEC, so I encourage any DEC-employee
  911.         reading this to check wether my writing is true, and to
  912.         support sources of information about the etherworks-III."
  913.  
  914. 2.10 Intel Ethernet Cards
  915.  
  916.     Supported: Ether Express
  917.  
  918.         This card uses the intel i82586. (Surprise, huh?)
  919.         The driver is in the standard release of pl15.
  920.         However, you will have to uncomment the line in
  921.         "config.in" to use it. -- yes, this line is
  922.         commented out for a reason. The driver is still
  923.         in the testing phases, as of v1.0 as well.
  924.  
  925.         There is some technical information available on
  926.         the i82586 in section 5.06, and also in the
  927.         source code for the driver "eexpress.c". Don't
  928.         be afraid to read it. ;-)
  929.  
  930.         The rason is that the driver works well with slow machines,
  931.         but the i82586 occasionally hangs from the packet buffer
  932.         contention that a fast machine can cause. I'll have
  933.         to find a work-around before releasing the driver.
  934.         One reported hack fix is to change all of the outw()
  935.         calls to outw_p().
  936.  
  937.  
  938.         If you do try the driver please post or send a report. 
  939.         Include the kind of machine you are trying it with,
  940.         and how heavily loaded your network is.
  941.  
  942.  
  943. 2.11 PureData
  944.  
  945.     Supported: PDUC8028, PDI8023
  946.  
  947.         The PureData PDUC8028 and PDI8023 series of cards are reported
  948.         to work, thanks to special probe code contributed by Mike
  949.         Jagdis <jaggy@purplet.demon.co.uk>. The support is integrated
  950.         with the WD driver.
  951.  
  952. 2.12 Xircom
  953.  
  954.     Another group that won't release documentation. No cards
  955.     supported. Don't look for any support in the future unless
  956.     they release their programming information. And this is
  957.     highly unlikely, as they *forbid* you from even reverse-
  958.     engineering their drivers. If you are already stuck with one,
  959.     see if you can trade it off on some DOS (l)user. Read section
  960.     9.01 if you are bored.
  961.  
  962.     And if you just want to verify that this is the case, you can
  963.     reach Xircom at 1-800-874-7875 or +1-818-878-7600.
  964.  
  965. 2.13 Zenith
  966.  
  967.     The built-in Z-Note network adaptor is based on the Intel
  968.     i82593 using two DMA channels. There might be a driver for it
  969.     in mid 1994. See section 5.06 for more information.
  970.     Also note that the Z-Note is compatible with the IBM ThinkPad 300.
  971.  
  972. 2.14 Racal-Interlan
  973.  
  974.     Note: I have been told that the following two drivers are 
  975.     for patchlevel 11, and hence are a bit dated. The original
  976.     author is Michael Hipp, and can be reached at the following addr:
  977.         zxmhp01@student.uni-tuebingen.de
  978.  
  979.     NI52**
  980.  
  981.     There is an alpha driver for the NI5210 floating about.
  982.     (last seen on tsx-11.mit.edu /pub/linux/ALPHA/ni/ni52.tar.gz)
  983.     This card also uses one of the Intel chips. See section
  984.     5.06 for more information.
  985.  
  986.     NI65**
  987.  
  988.     There is also a driver for the LANCE based NI6510, and it
  989.     can be found in the same place as the NI5210 driver above.
  990.     I am not sure how much work it would be to hack the current
  991.     LANCE driver in the kernel to support this card. If anyone
  992.     has done so, let me know.
  993.  
  994. 2.15 AMD LANCE (79C960)
  995.  
  996.     There really is no AMD ethernet card. You are probably reading this
  997.     because the only markings you could find on your card said AMD
  998.     and the above number. The above number refers to a chip from AMD
  999.     that is the heart of many ethernet cards. See the section on the
  1000.     Allied Telesis AT1500, the NE1500/2100 and the information in
  1001.     section 5.08. Chances are that the existing LANCE driver will work
  1002.     with all AMD LANCE based cards. (...except perhaps the above
  1003.     mentioned NI6510 ???)
  1004.     
  1005. 2.16 AT-Lan-Tec / RealTek Pocket adaptor
  1006.  
  1007.     This is a generic, low-cost OEM pocket adaptor being sold by
  1008.     AT-Lan-Tec, and (likely) a number of other suppliers. A
  1009.     driver for it is included in the standard pl15 kernel.
  1010.     Note that there is substantial information contained in the
  1011.     driver source file "atp.c" which presently lives in ./drivers/net/
  1012.     BTW, the adaptor (AEP-100L) has both 10baseT and BNC connections!
  1013.     You can reach AT-Lan-Tec at 1-301-948-7070. Ask for the model
  1014.     that works with Linux, or ask for "Vincent Bono" in tech support.
  1015.     In the Netherlands a compatible adaptor is sold under the name SHI-TEC
  1016.     PE-NET/CT, and sells for about $125. The vendor was Megasellers.
  1017.     They state that they do not sell to private persons, but I just
  1018.     gave them the name of my home institute. No questions asked.
  1019.     They are: Megasellers, Vianen, The Netherlands. They always
  1020.     advertise in Dutch computer magazines. In Germany, a similar
  1021.     adaptor comes as a no-brand-name product. Prolan 890b, no
  1022.     brand on the casing, only a roman II. Resellers can get a price
  1023.     of about $130, including a small wall transformer for the power.
  1024.  
  1025.     Physical Description
  1026.  
  1027.     The adaptor is "normal size" for the product class, about 57mm wide,
  1028.     22mm high tapering to 15mm high at the DB25 connector, and 105mm long
  1029.     (120mm including the BNC socket). It's switchable between the RJ45
  1030.     and BNC jacks with a small slide switch positioned between the two:
  1031.     a very intuitive design.
  1032.  
  1033.     It's powered by a lightweight 5V "wall brick" adaptor that terminates
  1034.     in a standard 5.0mm power connector. I measured an unconnected
  1035.     quiescent power draw of 102ma for BNC and 84ma for 10baseT. I hooked
  1036.     the pocket adaptor up to my home thinnet and started FTPing a large
  1037.     file. The power measurements were:
  1038.  
  1039.         idle, connected        99ma @ 5.1V
  1040.         active, connected    107ma @ 5.1V
  1041.  
  1042.     This was measured using a Fluke 8026B true-RMS multimeter, so I'm
  1043.     pretty confident the numbers are good. This power draw is low enough
  1044.     that you could buy or build a cable to take the 5V directly from the     
  1045.     keyboard/mouse port available on many laptops. (Bonus points here
  1046.     for using a standardized power connector instead of proprietary one.)
  1047.  
  1048. 2.17 Ansel
  1049.  
  1050.     Supported: AC3200 EISA
  1051.     
  1052.         This driver is not included in the pl15 kernel. To
  1053.         *alpha* test it, get the files ac3200.[c,h] from
  1054.         where you usually get alpha drivers (see the FAQ in
  1055.         this document if you dont know) and uncomment the
  1056.         line in config.in for the ac3200. If you use it,
  1057.         please let me know how things work out.
  1058.  
  1059. 2.18 DFI
  1060.  
  1061.     Supported: DFINET-300 (NE1000) and DFINET-400 (NE2000)
  1062.  
  1063.         These cards are now detected (as of pl15) thanks to
  1064.         Eberhard Moenkeberg <emoenke@gwdg.de> who noted that
  1065.         they use "DFI" in the first 3 bytes of the prom, instead
  1066.         of using 0x57 in bytes 14 and 15, which is what all the
  1067.         NE1000 and NE2000 cards use.
  1068.  
  1069. 3. Clones of popular Ethernet cards.
  1070.  
  1071.     Due to the popular design of some cards, different companies will
  1072.     make "clones" or replicas of the original card. However, one must
  1073.     be careful, as some of these clones are not 100% compatible, and
  1074.     can be troublesome. Some common problems with "not-quite-clones"
  1075.     are noted in the question and answer section of this document.
  1076.  
  1077.     Also note that if your card isn't mentioned here, that really
  1078.     means nothing. Chances are that even if it is only a half decent
  1079.     clone of the original, then it will still work.
  1080.  
  1081. 3.1 WD80x3 clones
  1082.  
  1083.     The following clones are reported to work with the standard
  1084.     WD80x3 driver:
  1085.  
  1086.     AT-LAN-TEC 8013
  1087.     PureData (not a 8013 clone, but the 8013 driver has special code)
  1088.     LANNET LEC-45
  1089.     PE-8013 (WD-8013 Compatible)
  1090.  
  1091. 3.2 NE2000 clones
  1092.  
  1093.     The following clones are reported to work with the standard
  1094.     NE2000 driver:
  1095.  
  1096.     Accton NE2000 (might not get detected at boot, see section 6)
  1097.     Alta Combo NE2000 clone
  1098.     Aritsoft LANtastic AE-2 (OK, but has flawed error-reporting registers)
  1099.     Asante Etherpak 2001/2003
  1100.     AT-LAN-TEC NE2000 clone (uses Winbond chip that traps SCSI drivers)
  1101.     Cabletron products: E10**, E10**-x, E20**, E20**-x
  1102.     Cnet UTP 10baseT (NE 2000 emulation)
  1103.     D-Link Ethernet II (bad clones, but the driver checks for them)
  1104.     4-Dimension FD0490 EtherBoard16
  1105.     LTC E-NET/16 P/N: 8300-200-002 (lipka@lip.hanse.de)
  1106.     Network Solutions HE-203
  1107.     SIIG Inc E-Lan/200 (NE 2000 comp.)
  1108.     SVEC 4 Dimension Ethernet
  1109.  
  1110. 4. Cables, coax, twisted pairs etc.
  1111.  
  1112.     If you are starting a network from scratch, it's considerably less
  1113.     expensive to use thin ethernet, RG58 co-ax cable with BNC connectors,
  1114.     than old-fashioned thick ethernet, RG-5 cable with N connectors, or
  1115.     10baseT, twisted pair telco-style cables with RJ-45 eight wire "phone"
  1116.     connectors.
  1117.  
  1118. 4.01 Thin Ethernet (thinnet)
  1119.  
  1120.     Thin ethernet is the "ether of choice". The cable is inexpensive. If
  1121.     you are making your own cables solid-core RG58A is $0.09/ft. and
  1122.     stranded RG58AU is $0.15/ft. Twist-on BNC connectors are < $2 ea.,
  1123.     and other misc. pieces are similarly inexpensive. It is essential
  1124.     that you properly terminate each end of the cable with 50 ohm
  1125.     terminators, so budget $2 ea. for a pair. It's also vital that
  1126.     your cable have no "stubs" -- the 'T' connectors must be attached
  1127.     directly to the ethercards. The only drawback is that if you have
  1128.     a big loop of machines connected together, and some bonehead breaks
  1129.     the loop by taking one cable off the side of his tee, the whole
  1130.     network goes down because it sees an infinite impedance (open
  1131.     circuit) instead of the required 50 ohm termination. Note that
  1132.     you can remove the tee piece from the card itself without killing
  1133.     the whole subnet, as long as you don't remove the cables from the
  1134.     tee itself. Of course this will disturb the machine that you
  1135.     pull the actual tee off of. 8-) And if you are doing a small
  1136.     network of two machines, you *still* need the tees and the 50 ohm
  1137.     terminators -- you *can't* just cable them together!
  1138.     
  1139.  
  1140. 4.02 Twisted pair
  1141.  
  1142.     Twisted pair networks require active hubs, which start around $200,
  1143.     and the raw cable cost can actually be higher than thinnet. They are
  1144.     usually sold using the claim that you can use your existing telephone
  1145.     wiring, but it's a rare installation where that turns out to be the
  1146.     case. The claim that you can upgrade to higher speeds is also
  1147.     suspect, as most proposed schemes use higher-grade (read $$) cable and
  1148.     more sophisticated termination ($$$) than you would likely install on
  1149.     speculation. New gizmos are floating around which allow you to
  1150.     daisy-chain machines together, and the like. For example,
  1151.     Falleron sells EtherWave adaptors and transceivers. This device
  1152.     allows multiple 10baseT devices to be daisy-chained. They also
  1153.     sell a 3c509 clone that includes the EtherWave transceiver.
  1154.     The drawback is that it's more expensive and less reliable than a 
  1155.     cheap ($100-$150) mini-hub and another ethercard. IMO, you should
  1156.     either go for the hub approach or switch over to 10base2 thinnet.
  1157.  
  1158.     On the other hand, hubs are rapidly dropping in price, all 100Mb/sec
  1159.     ethernet proposals use twisted pair, and most new business
  1160.     installations use twisted pair. (This is probably to avoid the
  1161.     problem with idiots messing with the BNC's as described above.)
  1162.  
  1163.     If you are only connecting two machines, it is possible to avoid
  1164.     using a hub, by swapping the Rx and Tx pairs (1-2 and 3-6).
  1165.  
  1166.     Also, Russ Nelson adds that "New installations should use Category 5
  1167.     wiring. Anything else is a waste of your installer's time, as
  1168.     100Base-whatever is going to require Cat 5."
  1169.  
  1170. 4.03 Thick Ethernet
  1171.  
  1172.     Thick ethernet is mostly obsolete, and is usually used only to remain
  1173.     compatible with an existing implementation. You can stretch the rules
  1174.     and connect short spans of thick and thin ethernet together with a
  1175.     passive $3 N-to-BNC connector, and that's often the best solution to
  1176.     expanding an existing thicknet. A correct (but expensive) solution is
  1177.     to use a repeater in this case.
  1178.  
  1179.  
  1180. 5 Technical information.
  1181.  
  1182.     For those who want to play with the present drivers, or try to make
  1183.     up their own driver for a card that is presently unsupported, this
  1184.     information should be useful. If you do not fall into this category,
  1185.     then perhaps you will want to skip this section.
  1186.  
  1187. 5.01 Probed addresses
  1188.  
  1189.     While trying to determine what ethernet card is there, the following
  1190.     addresses are autoprobed, assuming the type and specs of the card
  1191.     have not been set in the kernel. As of 0.99pl12, doing a "make config"
  1192.     will ask what cards are to be supported. The file names below are
  1193.     in /usr/src/linux/drivers/net/
  1194.     ----------------------------------------------------------------
  1195.     wd.c:        0x300, 0x280, 0x380, 0x240
  1196.     3c501.c        0x280
  1197.     3c503.c:    0x300, 0x310, 0x330, 0x350, 0x250, 0x280, 0x2a0, 0x2e0
  1198.     3c507.c:    0x300, 0x320, 0x340, 0x280
  1199.     3c509.c:    <Special "ID Port" probe>
  1200.     at1700.c:    0x300, 0x280, 0x380, 0x320, 0x340, 0x260, 0x2a0, 0x240
  1201.     atp.c:        0x378, 0x278, 0x3bc
  1202.     depca.c        0x300, 0x200
  1203.     d_link.c:    0x378
  1204.     ne.c:        0x300, 0x280, 0x320, 0x340, 0x360
  1205.     hp.c:        0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240
  1206.     lance.c:    0x300, 0x320, 0x340, 0x360
  1207.     smc-ultra.c:    0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380
  1208.     eexpress.c:    0x300, 0x270, 0x320, 0x340
  1209.     3c509.c:    <Special "ID Port" probe>
  1210.     ----------------------------------------------------------------
  1211.     There are some NE2000 clone ethercards out there that are waiting black
  1212.     holes for autoprobe drivers. While many NE2000 clones are
  1213.     safe until they are enabled, some can't be reset to a safe mode.
  1214.     These dangerous ethercards will hang any I/O access to their
  1215.     "dataports". The typical dangerous locations are:
  1216.  
  1217.     Ethercard jumpered base     Dangerous locations (base + 0x10 - 0x1f)
  1218.         0x300 *                0x310-0x317
  1219.         0x320                0x330-0x337
  1220.         0x340                0x350-0x357
  1221.         0x360                0x370-0x377
  1222.  
  1223.     * The 0x300 location is the traditional place to put an ethercard, but
  1224.     it's also a popular place to put other devices (often SCSI
  1225.     controllers). The 0x320 location is often the next one chosen, but
  1226.     that's bad for for the AHA1542 driver probe. The 0x360 location is
  1227.     bad, because it conflicts with the parallel port at 0x378.
  1228.  
  1229.     To avoid these lurking ethercard, here are the things you can do:
  1230.  
  1231.     o Probe for the device's BIOS in memory space. This is easy
  1232.       and always safe, but it only works for cards that always have
  1233.       BIOSes, like primary SCSI controllers.
  1234.  
  1235.     o Avoid probing any of the above locations until you think
  1236.       you've located your device. The NE2000 clones have a reset range
  1237.       from <base>+0x18 to <base>+0x1f that will read as 0xff, so probe
  1238.       there first if possible. It's also safe to probe in the 8390
  1239.       space at <base>+0x00 - <base>+0x0f, but that area will return
  1240.       quasi-random values
  1241.  
  1242.     o If you must probe in the dangerous range, for instance if your
  1243.       target device has only a few port locations, first check that
  1244.       there isn't an NE2000 there. You can see how to do this by
  1245.       looking at the probe code in /usr/src/linux/net/inet/ne.c
  1246.  
  1247.     In other news, I've written the code for the I/O port registrar.
  1248.     Peter MacDonald and I have been intensely discussing this, and I think
  1249.     our current scheme has the necessary functionality with minimal kernel
  1250.     size impact. (The implementation involved rewriting the bitmap ops in
  1251.     kernel/ioport.c:ioperm() so that most code could be shared.)
  1252.  
  1253.     Here is the current "blurb". As usual comments are welcome. Please
  1254.     keep them substantial and constructive (we've already talked about
  1255.     changing the name from "reserve=" to "noprobe=").
  1256.  
  1257.     ==================
  1258.  
  1259.     Boot-Time Parameters: "reserve="
  1260.     
  1261.     In some machines it may be necessary to prevent device drivers from
  1262.     checking for devices (auto-probing) in a specific region. This may be
  1263.     because of poorly designed hardware that causes the boot to "freeze"
  1264.     (such as some ethercards), hardware that is mistakenly identified,
  1265.     hardware whose state is changed by an earlier probe, or merely
  1266.     hardware you don't want the kernel to initialize.
  1267.  
  1268.     The "reserve" boot-time argument addresses this problem by specifying
  1269.     an I/O port region that shouldn't be probed. That region is reserved
  1270.     in the kernel's port registration table as if a device has already
  1271.     been found in that region. Note that this mechanism shouldn't be
  1272.     necessary on most machine, only when there is a problem or special
  1273.     case.
  1274.  
  1275.     The boot-line syntax is
  1276.  
  1277.       lilo-prompt: linux-image reserve=[<port>,<size>,<port>,<size>...]
  1278.  
  1279.     As usual with boot-time specifiers there is an 11 parameter limit, thus
  1280.     you can only specify 5 reserved regions per "reserve" keyword.
  1281.     Multiple "reserve" specifiers will work if you have an usually
  1282.     complicated request.
  1283.  
  1284.     If you specify a "reserve" region to protect a specific device, you
  1285.     must generally specify an explicit probe for that device. Most
  1286.     drivers ignore the port registration table if they are given an
  1287.     explicit address.
  1288.  
  1289. 5.02 Skeleton / prototype driver
  1290.  
  1291.     OK. So you have decided that you want to write a driver for the
  1292.     Foobar Ethernet card, as you have the programming information,
  1293.     and it hasn't been done yet. (...these are the two main require-
  1294.     ments ;-) You can use the skeleton network driver that is provided
  1295.     with the Linux kernel source tree. It can be found in the file
  1296.     /usr/src/linux/drivers/net/skeleton.c as of 0.99pl15, and later.
  1297.  
  1298.     It's also very useful to look at the Crynwr (nee Clarkson) driver
  1299.     for your target ethercard, if it's available. Russ Nelson
  1300.     <nelson@crynwr.com> has been actively updating and writing these,
  1301.     and he has been very helpful with his code reviews of the current
  1302.     Linux drivers.
  1303.  
  1304. 5.03 Driver interface to the kernel
  1305.  
  1306.     Here are some notes that may help when trying to figure out what
  1307.     the code in the driver segments is doing, or perhaps what it is
  1308.     supposed to be doing.
  1309.  
  1310.     =====================================================
  1311.  
  1312.     int ethif_init(struct device *dev)
  1313.     {
  1314.         ...
  1315.         dev->send_packet = &ei_send_packet;
  1316.         dev->open = &ei_open;
  1317.         dev->stop = &ei_close;
  1318.         dev->hard_start_xmit = &ei_start_xmit;
  1319.         ...
  1320.     }
  1321.  
  1322.     int ethif_init(struct device *dev)
  1323.  
  1324.     This function is put into the device structure in Space.c. It is
  1325.     called only at boot time, and returns '0' iff the ethercard 'dev'
  1326.     exists.
  1327.  
  1328.     =====================================================
  1329.  
  1330.     static int ei_open(struct device *dev)
  1331.     static int ei_close(struct device *dev)
  1332.  
  1333.     This routine opens and initializes the board in response to an
  1334.     socket ioctl() usually called by 'config' or 'ifconfig'. It is
  1335.     commonly stuffed into the 'struct device' by ethif_init().
  1336.  
  1337.     The inverse routine is ei_close(), which should shut down the
  1338.     ethercard, free the IRQs and DMA channels if the hardware permits,
  1339.     and turn off anything that will save power (like the transceiver).
  1340.  
  1341.     (Note: As of NET-2, the relevant program is '/etc/ifconfig' - and
  1342.     the device *can* be turned off or on via passing 'up' or 'down'
  1343.     to 'ifconfig' from the command line with the device name.)
  1344.  
  1345.     =====================================================
  1346.  
  1347.     static int ei_start_xmit(struct sk_buff *skb, struct device *dev)
  1348.         dev->hard_start_xmit = &ei_start_xmit;
  1349.  
  1350.     This routine puts packets to be transmitted into the hardware. It
  1351.     is usually stuffed into the 'struct device' by ethif_init().
  1352.  
  1353.     When the hardware can't accept additional packets it should set
  1354.     the dev->tbusy flag. When additional room is available, usually
  1355.     during a transmit-complete interrupt, dev->tbusy should be cleared
  1356.     and the higher levels informed with mark_bh(INET_BH).
  1357.     [[Note: pre0.99.4 kernels didn't use this interface for all packets.]]
  1358.     
  1359.     =====================================================
  1360.  
  1361.     ...
  1362.         if (dev_rint(buffer, length, is_skb ? IN_SKBUFF : 0, dev))
  1363.            stats->rx_dropped++;
  1364.     ...
  1365.     A received packet is passed to the higher levels using dev_rint().
  1366.     If the unadorned packet data in a memory buffer, dev_rint will copy
  1367.     it into a 'skbuff' for you. Otherwise a new skbuff should be
  1368.     kmalloc()ed, filled, and passed to dev_rint() with the IN_SKBUFF flag.
  1369.  
  1370.     =====================================================
  1371.  
  1372. 5.04 Interrupts and Linux
  1373.  
  1374.     There are two kinds of interrupt handlers in Linux:
  1375.     fast ones and slow ones. You decide what kind you are installing by
  1376.     the flags you pass to irqaction(). The fast ones, such as the serial
  1377.     interrupt handler, run with _all_ interrupts disabled. The normal
  1378.     interrupt handlers, such as the one for ethercard drivers, runs with
  1379.     other interrupts enabled.
  1380.  
  1381.     There is a two-level interrupt structure. The "fast" part handles the
  1382.     device register, removes the packets, and perhaps sets a flag.  After
  1383.     it is done, and interrupts are re-enabled, the slow part is run if the
  1384.     flag is set.
  1385.  
  1386.     The flag between the two parts is set by:
  1387.         mark_bh(INET_BH);
  1388.  
  1389.     Usually this flag is set within dev_rint() during a received-packet
  1390.     interrupt, and set directly by the device driver during a
  1391.     transmit-complete interrupt.
  1392.  
  1393.     You might wonder why all interrupt handlers cannot run in
  1394.     "normal mode" with other interrupts enabled. Ross Biro uses this
  1395.     scenario to illustrate the problem:
  1396.         o You get a serial interrupt, and start processing it.
  1397.           The serial interrupt is now masked.
  1398.         o You get a network interrupt, and you start transferring
  1399.           a maximum-sized 1500 byte packet from the card.
  1400.         o Another character comes in, but this time the interrupts
  1401.           are masked!
  1402.  
  1403.     The "fast" interrupt structure solves this problem by allowing
  1404.     bounded-time interrupt handlers to run without the risk of leaving
  1405.     their interrupt lines masked by another interrupt request.
  1406.  
  1407.     There is an additional distinction between fast and slow interrupt
  1408.     handlers -- the arguments passed to the handler. A "slow" handler is
  1409.     defined as
  1410.  
  1411.         static void
  1412.         handle_interrupt(int reg_ptr)
  1413.         {
  1414.             int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
  1415.             struct device *dev = irq2dev_map[irq];
  1416.         ...
  1417.  
  1418.     While a fast handler gets the interrupt number directly
  1419.  
  1420.         static void
  1421.         handle_fast_interrupt(int irq)
  1422.         {
  1423.         ...
  1424.  
  1425.     A final aspect of network performance is latency. The only board
  1426.     that really addresses this is the 3c509, which allows a predictive
  1427.     interrupt to be posted. It provides an interrupt response timer so
  1428.     that the driver can fine-tune how early an interrupt is generated.
  1429.  
  1430.     Alan Cox has some advice for anyone wanting to write drivers
  1431.     that are to be used with pl14 kernels and newer. He says:
  1432.  
  1433.     "Any driver intended for pl14 should use the new alloc_skb() and
  1434.     kfree_skbmem() functions rather than using kmalloc() to obtain an
  1435.     sk_buff. The new pl14 skeleton does this correctly. For drivers
  1436.     wishing to remain compatible with both sets the define
  1437.     'HAVE_ALLOC_SKB' indicates these functions must be used.
  1438.  
  1439.     In essence replace
  1440.  
  1441.         skb=(struct sk_buff *)kmalloc(size)
  1442.     with
  1443.  
  1444.         skb=alloc_skb(size)
  1445.  
  1446.     and
  1447.  
  1448.         kfree_s(skb,size)
  1449.  
  1450.     with
  1451.  
  1452.         kfree_skbmem(skb,size)    /* Only sk_buff memory though */
  1453.  
  1454.     Any questions should I guess be directed to me since I made the change.
  1455.     This is a change to allow tracking of sk_buff's and sanity checks on
  1456.     buffers and stack behaviour. If a driver produces the message
  1457.     'File: ??? Line: ??? passed a non skb!' then it is probable the
  1458.     driver is not using the new sk_buff allocators."
  1459.  
  1460.  
  1461. 5.05 Programmed I/O vs. shared mem. vs. slave/master DMA
  1462.  
  1463.     Ethernet is 10Mbs. (Don't be pedantic, 3Mbs and 100Mbs don't count.)
  1464.     If you can already send and receive back-to-back packets, you just
  1465.     can't put more bits over the wire. Every modern ethercard can receive
  1466.     back-to-back packets. The Linux DP8390 drivers come pretty close to
  1467.     sending back-to-back packets (depending on the current interrupt
  1468.     latency) and the 3c509 and AT1500 hardware has no problem at all
  1469.     automatically sending back-to-back packets.
  1470.  
  1471.     The ISA bus can do 5.3MB/sec (42Mb/sec), which sounds like more than
  1472.     enough. You can use that bandwidth in several ways:
  1473.  
  1474.     Programmed I/O
  1475.     ==============
  1476.       Pro: Doesn't use any constrained system resources,
  1477.            just a few I/O registers, and has no 16M limit.
  1478.       Con: Usually the slowest transfer rate, the CPU is waiting
  1479.            the whole time, and interleaved packet access is usually
  1480.            difficult to impossible.
  1481.  
  1482.     Shared memory
  1483.     =============
  1484.       Pro: Simple, faster than programmed I/O, and allows random
  1485.            access to packets.
  1486.       Con: Uses up memory space (a big one for DOS users, only a minor
  1487.            issue under Linux), and it still ties up the CPU.
  1488.  
  1489.     Slave (normal) DMA
  1490.     ==================
  1491.       Pro: Frees up the CPU during the actual data transfer.
  1492.       Con: Checking boundary conditions, allocating contiguous buffers,
  1493.            and programming the DMA registers makes it the slowest
  1494.            of all techniques.  It also uses up a scarce DMA
  1495.            channel, and requires aligned low memory buffers.
  1496.  
  1497.     Master (bus-master) DMA
  1498.     =======================
  1499.       Pro: Frees up the CPU during the data transfer, can string together
  1500.            buffers, can require little or no CPU time lost on the
  1501.            ISA bus.
  1502.       Con: Requires low-memory buffers and a DMA channel. Any
  1503.            bus-master will have problems with other bus-masters that
  1504.            are bus-hogs, such as some primitive SCSI adaptors. A few
  1505.            badly-designed motherboard chipsets have problems with
  1506.            bus-masters. And a reason for not using *any* type of
  1507.            DMA device is using a Cyrix 486 processor designed for
  1508.            plug-in replacement of a 386: these processors must
  1509.            flush their cache with each DMA cycle.
  1510.  
  1511. ---End of part 1/2---
  1512.  
  1513.  
  1514.